﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarterWechatServer.DataEntity.Entities
{
    /// <summary>
    /// 用户实体类
    /// </summary>
    [Table("User")]
    public class UserEntity
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 用户昵称
        /// </summary>
        [Required]
        [StringLength(200)]
        public string NickName { get; set; }

        /// <summary>
        /// 用户头像地址
        /// </summary>
        [StringLength(256)]
        public string HeadImageUrl { get; set; }

        /// <summary>
        /// 登录名
        /// </summary>
        [StringLength(50)]
        public string LoginName { get; set; }

        /// <summary>
        /// 登录密码
        /// </summary>
        [StringLength(128)]
        public string LoginPassword { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public int Gender { get; set; }

        public virtual ICollection<UserExtraLoginEntity> UserExtraLogins { get; set; }
    }
}
